package pageutil

type Pager struct {
	Current  int         `json:"current"`
	PageSize int         `json:"pageSize"`
	Total    int64       `json:"total"`
	Data     interface{} `json:"data"`
}

func NewPager(current int, pageSize int, total int64, data interface{}) *Pager {
	return &Pager{
		Current:  current,
		PageSize: pageSize,
		Total:    total,
		Data:     data,
	}
}

func Page(current int, pageSize int, total int64, data interface{}) *Pager {
	return NewPager(current, pageSize, total, data)
}
